package com.yanqu.road.server.cmd.activity.tonbingchannel.channel;

import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.pb.activity.ChannelTonBingProto;
import com.yanqu.road.server.cmd.base.AbstractCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.gameplayer.GamePlayer;
import com.yanqu.road.server.gameplayer.module.activity.tonbingchannel.ChannelTonBingModule;
import com.yanqu.road.server.manger.activity.tonbingchannel.ChannelTonBingMgr;
import com.yanqu.road.server.protocol.GameProtocol;

@Cmd(code = GameProtocol.S_CTON_BING_GET_LOCK_USERIDS_BACK, desc = "返回锁定的玩家列表")
public class TonBingGetLockUserIdsFromCrossCmd extends AbstractCommand {

    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        return true;
    }

    @Override
    public void execute(GamePlayer player, YanQuMessage packet) throws Exception {
        ChannelTonBingProto.CTonBingGetPromotionUserIdsRespMsg reqMsg = ChannelTonBingProto.CTonBingGetPromotionUserIdsRespMsg.parseFrom(packet.getBytes());
        for (Long userId : reqMsg.getUserIdList()) {
            ChannelTonBingMgr.addAbleUserId(userId);
        }
    }

    @Override
    public void sendData(GamePlayer player) {

    }
}
